package com.bite.book.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/test")
@RestController
public class TextController {
    @RequestMapping("/t1")
    public Integer t1(){
        int a=10/0;//除数不能为零异常；
        return 1;
    }
    @RequestMapping("/t2")
    public boolean t2(){
        int[] aa={1,2,3};
        System.out.println(aa[4]);//越界异常；
        return true;
    }
    @RequestMapping("/t3")
    public String  t3(){
        String a=null;
        System.out.println(a.length());
        //空指针异常；
        return "t3";
    }
}
